package com.example.meituxiuxiu.activitys;

import android.app.Activity;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.widget.ImageView;

import androidx.annotation.Nullable;

public class BitmapTestActivity extends Activity {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ImageView iv=new ImageView(this);
        setContentView(iv);

        Bitmap bitmap=null;
        try {
            bitmap=Bitmap.createBitmap(200,200,Bitmap.Config.ALPHA_8);
        }catch (Exception e) {
            e.printStackTrace();
        }finally {
            try {
                if(bitmap!=null){
                    bitmap.recycle();
                }
            }catch (Exception e){
                e.printStackTrace();
            }
        }
    }
}
